package com.lqq.chapter05;

/**
 * @Author lqq677
 * @Date 2021/8/11 15:26
 * @Description 可重入锁测试：synchronized
 */

public class ReentrantLockTest {

    public synchronized static void service1() {
        System.out.println("service1...");
        service2();
    }

    public synchronized static void service2() {
        System.out.println("service2...");
        service3();
    }

    public synchronized static void service3() {
        System.out.println("service3...");
    }
    public static void main(String[] args) {
        service1();
    }
}
